import React from 'react'
import { useSearchParams,useNavigate } from 'react-router-dom'

export default function Detail() {
    // ?携带参数
    const [params] =  useSearchParams()
    console.log(params.getAll('id')[0])
    const navigate = useNavigate()

    const  goHome = ()=>{
        navigate('/',{
            state:{
                id:'66'
            }
        })
    }
  return (
    <div>
        Detail
        <button onClick={goHome}>

        </button>
    </div>

  )
}
